package Single;

public class SingletonLazy {
    private static volatile SingletonLazy singletonLazy=null;
    public SingletonLazy(){
        //构造方法
    }
    static Object object=new Object();
    public static SingletonLazy getSingletonLazy() {
       if(singletonLazy==null){
           synchronized(object){
               if(singletonLazy==null){
                   singletonLazy=new SingletonLazy();
               }
           }
       }
        return singletonLazy;
    }
}
